package com.sias.sogra.service;

import com.sias.sogra.mapper.MemberMapper;
import com.sias.sogra.mapper.OrderMapper;
import com.sias.sogra.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 吴文杰
 * @version 1.0
 * @createTime 2023-05-30 14:18:10
 */
@Component
public class UserService {

  //Autowired  先byType 后byName   Resource 先byName 后byType
  @Autowired
  UserMapper userMapper; // Mybatis代理对象 赋值给 属性userMapper

  @Autowired
  OrderMapper orderMapper;
  @Autowired
  MemberMapper memberMapper;
  public void test() {
    System.out.println("userMapper:"+userMapper);
    System.out.println("userMapper:"+userMapper.getUsername());

    System.out.println("orderMapper:"+orderMapper);
    System.out.println("orderMapper:"+orderMapper.getUsername());


    System.out.println("memberMapper:"+memberMapper);
    System.out.println("memberMapper:"+memberMapper.getUsername());
  }
}
